package com.jt.common.util;

import java.math.BigDecimal;

/**
 * @Author: Jingyan
 * @Time: 2018-06-08 10:28
 * @Description:
 */
public class BigDecimalUtil {

    /**
     * Created with Jingyan
     * Time: 2018-06-08 10:32
     * Description: int 除法取整
     */
    public static int divideRoundUp(int v1, int v2) {
        BigDecimal b1 = new BigDecimal(v1);
        BigDecimal b2 = new BigDecimal(v2);
        BigDecimal result = b1.divide(b2, 0, BigDecimal.ROUND_UP);
        return result.intValue();
    }
}